﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" %>

<script runat="server">
    Dim users1 As users = New users()
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        users1.name = "jose"
        users1.username = "js"
        users1.active = True
        users1.email = "jose@hotgirl.sex"
        users1.id_permissions = 1
        users1.pass = "abcd"
        
        Response.Write(users1.name)
        
    End Sub
    Public Sub show_users_on_page()
        txt_active.Text = users1.active.ToString()
        txt_email.Text = users1.email.ToString()
        txt_id_permission.Text = users1.id_permissions.ToString()
        txt_name.Text = users1.name.ToString()
        txt_pass.Text = users1.pass.ToString()
        txt_username.Text = users1.username.ToString()
    End Sub
    Public Sub cleanfields()
        txt_active.Text = ""
        txt_email.Text = ""
        txt_id_permission.Text = ""
        txt_name.Text = ""
        txt_pass.Text = ""
        txt_username.Text = ""
        
        
    End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
show_users_on_page()
End Sub

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    cleanfields()
    End Sub
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1 style="height: 48px">Users</h1>


<table>
<tr>
    <td>
        <asp:Label ID="lbl_name" runat="server" Text="Name"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txt_name" runat="server"></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        <asp:Label ID="lbl_username" runat="server" Text="username"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txt_username" runat="server"></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        <asp:Label ID="lbl_active" runat="server" Text="active"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txt_active" runat="server"></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        <asp:Label ID="lbl_email" runat="server" Text="email"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txt_email" runat="server"></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        <asp:Label ID="lbl_id_permission" runat="server" Text="permission"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txt_id_permission" runat="server"></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        <asp:Label ID="lbl_pass" runat="server" Text="pass"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="txt_pass" runat="server"></asp:TextBox>
    </td>
</tr>

  <tr>
  <td><asp:Button ID="Button1" runat="server" Text="show" onclick="Button1_Click" /></td>
  <td><asp:Button ID="Button2" runat="server" Text="clear" onclick="Button2_Click" /></td>
</tr>  
</table>
</asp:Content>

